#pragma once
#include <iostream>
#include <assert.h>

using namespace std;

typedef struct BinaryTreeNode
{
	struct BinaryTreeNode* left;
	struct BinaryTreeNode* right;
	int val;
}TreeNode;

TreeNode* BuyNewNode(int x);

void PreOrder(TreeNode* p);
void InOrder(TreeNode* p);
void PostOrder(TreeNode* p);

int BinaryTreeSize(TreeNode* p);

int BinaryTreeLeafSize(TreeNode* p);

int BinaryTreeLevelKSize(TreeNode* p, int k);

int BinaryTreeDepth(TreeNode* p);

TreeNode* BinaryTreeFind(TreeNode* p , int x);

